package com.woniuxy.commentmodel.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("新增评论参数列表")
public class AddCommentForm {
    @ApiModelProperty("评论具体内容")
    @NotBlank(message = "评论内容不为空")
    private String content;

    @ApiModelProperty("评论上传图片")
    private String commentImage;

    @ApiModelProperty("订单号")
    @NotBlank(message = "订单号不能为空")
    private String orderNum;
    @ApiModelProperty("评分")
    @NotNull(message = "评分不能为空")
    @Min(value = 0,message = "至少为0")
    @Max(value = 5,message = "最大为5")
    private Double rate;
}
